home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_oth
/
mawk10
/
mawk_tes.bat
< prev
next >
Wrap
DOS Batch File
|
1991-10-06
|
1KB
|
50 lines
echo off
rem This is a simple test that a new made mawk seems to
rem be working OK.
rem It's certainly not exhaustive, but the last two tests in
rem particular use most features.
rem
rem It needs to be run from mawk\msdos\dostest and mawk needs to be in ..\..
rem
rem it's too bad that years after MSDOS was introduced that basic
rem system utilities like fc still don't return valid exit codes!!!
set dat=mawk_tes.dat
rem find out which mawk we're testing
..\..\mawk -V
rem ################################
echo testing input and field splitting
..\..\mawk -f ..\..\test\wc.awk %dat% > temp$$
fc temp$$ wc-awk.out
if errorlevel 1 goto :done
rem ####################################
echo testing regular expression matching
..\..\mawk -f ..\..\test\reg0.awk %dat% > temp$$
..\..\mawk -f ..\..\test\reg1.awk %dat% >> temp$$
..\..\mawk -f ..\..\test\reg2.awk %dat% >> temp$$
fc temp$$ reg-awk.out
if errorlevel 1 goto :done
rem ######################################
echo testing arrays and flow of control
..\..\mawk -f ..\..\test\wfrq0.awk %dat% > temp$$
fc temp$$ wfrq-awk.out
if errorlevel 1 goto :done
rem ################################
echo testing function calls and general stress test
..\..\mawk -f ..\..\examples\decl.awk %dat% > temp$$
fc temp$$ decl-awk.out
if errorlevel 1 goto :done
echo if fc always encountered "no differences", then the tested mawk seems OK
del temp$$
:done